 let obj={
     name:'zs',
     age:18,
     hobby:{
         a:'唱',
         b:'跳',
         c:'rap'
     },
     a:undefined,
     b:null,
     e:{}
 }

 function deepCopy(obj){
    let newObj ={}
    for( let key in obj ){
        if(obj.hasOwnProperty(key)){
            //先判断 obj[key] 值得类型，如果是原始类型，直接赋值，如果是引用类型，xxxx
            if(typeof obj[key] === 'object' && obj[key] != null){
               newObj[key] = deepCopy(obj[key])
            }else{
                newObj [key] = obj [key]
            }
        }
    }
    return newObj
 }
 console.log(deepCopy(obj));
 obj.hobby.a='篮球'
